class MainTop extends egret.DisplayObjectContainer {
	public constructor() {
		super();
		this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this);
	}
	public onAddToStage() {
		// var rightAm = new Am1(120,230,"leftcandy");
		// rightAm.y = 380;
		// rightAm.x = 970;
		// this.addChild(rightAm);

		var leftAm = new Am1(160, 280, "rightcandy");
		leftAm.x = -50;
		leftAm.y = 330;
		this.addChild(leftAm);

		// window.setInterval(function () {
		// 	// rightAm.openAm();
		// }, 6000);
		window.setInterval(function () {
			leftAm.openAm();
		}, 8000);
	}
}